1. Technical Field
The present invention relates in general to document presentation, and, in particular, to document presentation in a direct mode and a production-level print-on-demand (POD) mode.
2. Description of the Related Art
A document is generally a data collection created by an application program, such as a word processing application, that is logically subdivided into pages. A page comprises objects, such as text, images, graphical objects, and display elements, that are to be displayed on one side of a sheet, subject to various formatting specifications, such as size, margins, font, color, depth, etc. When printed, document pages are presented on sheets, which are presentation units generally having at least two sides (e.g., a front side and a back side). Each side of a sheet may contain one or more pages.
When a document is presented by a printer or display device, the printer or display device receives and processes a data stream that contains the document to be presented. Ideally, the data stream should produce the same document content in the same format on different printers or display devices, subject to the capabilities of each of the printers or display devices. Documents may be presented by a printer or display device in either of a direct mode and an xe2x80x9con-demandxe2x80x9d mode (e.g., Print-On-Demand (xe2x80x9cPODxe2x80x9d) mode).
In a direct mode of printing, a rasterizing processor (or rasterizer) within the print control unit of the printer receives and processes the data from the data stream into at least rasterized data (e.g., text, graphics, objects, pixels, fonts, etc.) and a sheet specification (e.g., length, width, margins, and other format parameters of the sheet) for each sheet of the document. The rasterized data are stored (i.e., typically compressed and stored) into a local print memory system, and a pointer identifies the location in the local memory system where the rasterized data are stored for each side or object of a sheet. Each two-sided sheet therefore typically has at least two pointers (i.e., one pointer for each side of the sheet) in the local memory system. The sheet specification for each sheet of the document is stored in the same or another memory system of the printer in a queue format (e.g., in a xe2x80x9csheet queuexe2x80x9d).
The printer then accesses and processes the sheet specification for each sheet in the sheet queue, typically in a first-in, first-out manner (i.e., first sheet specification sent to sheet queue is processed first).
Based on the next sheet specification in the sheet queue, the printer locates the respective rasterized data for the sheet in the printer memory system utilizing the pointer(s) for the side(s) of the sheet. The printer directs the rasterized data for the sheet to the print head. The print head receives the respective rasterized data for the sheet and accordingly prints the sheet. Thus, the direct mode of printing involves printing a sheet of a document xe2x80x9con-the-flyxe2x80x9d utilizing rasterized data stored locally in the printer memory system. This method of printing is particularly useful for printing a large volume of simplistically formatted sheets, such as a large number of sheets printed for a billing application.
In the POD mode of printing, a rasterizing processor within the print control unit of a printer also receives and processes the data stream into a sheet specification and rasterized data for each sheet of the document. The sheet specification in the POD mode contains a side specification, which is a list of the object(s) for each side of the sheet. The rasterizing processor directs the sheet specification for each sheet to be stored in a print memory system in a queue format (e.g., in a sheet queue). However, in the POD mode the rasterizing processor directs storage of the rasterized data, which contains the rag object(s) for each sheet of the document, in a database since the rasterizing code does not build the sides of the document sheets.
To present a document in POD mode, the printer obtains and processes the next sheet specification from the sheet queue. The printer forwards the side specification(s) for the side(s) of the sheet to side builder code within the print control unit. The side builder code retrieves the objects listed in the sheet specification for the sheet from the database and builds the data for the side(s) of the sheet. After the data for the side(s) of a sheet are built, the built side(s) of the sheet are stored into a local print memory system. The printer then sends a command to the print head to print the sheet after the data for the sides are built. In response to the print command, the print head retrieves the data for the side(s) of the sheet from the print memory system and prints the sheet. Thus, the POD mode of printing involves building side(s) of a sheet from an object list stored in a sheet queue and accessing the objects stored in a database in order to build the side(s) of the sheet. This method of printing is particularly useful for printing sheets with more complex data, such as printing sheets from a book.
Some printers can support both direct and POD modes of printing. However, in conventional dual-mode printers, the processor(s) of the printer must be rebooted and reconfigured (i.e., manual re-booting) each time the rasterizer of the printer is switched between modes. Such conventional printers are not able to automatically switch between different modes of printing. Rebooting a printer each time the printing mode is changed is an extremely cumbersome, tedious, and time-consuming process. If the printer mode is not switched when a mode switch should be made so as to avoid rebooting the printer or reconfiguring the processor(s) of the printer every time a switch in print mode should be made, then this typically results in print jobs being printed in an inefficient print mode.
In view of the foregoing and other drawbacks of the prior art, it can be appreciated that there is a need for an improved system for printing documents in a plurality of modes.
A method, system, and program for automatically switching operational modes of a presentation device between direct and on-demand modes are disclosed. A rasterizer of a presentation device receives a data stream containing various data sets to be presented. The rasterizer detects occurrences of an include command that specifies previously stored rasterized data in the database that is to be presented. In response to the detected include commands, the rasterizer automatically switches between a direct mode and an on-demand mode of presentation as an operational mode for the presentation device while continuously processing the data stream.
In a preferred embodiment in which the presentation device is a printer, the printer is initialized to operate in a desired operational print mode. If the printer is operating in the on-demand mode of presentation, the print rasterizer tracks a predetermined number of consecutive pages that do not contain an include command. The print rasterizer then switches the printer to operate in the direct mode if the print rasterizer has detected the predetermined number of consecutive pages that do not have the include command. Conversely, if the printer is operating in the direct mode of presentation, the print rasterizer tracks a predetermined number of consecutive pages that contain an include command. The print rasterizer then switches the printer to operate in the on-demand mode of presentation if the print rasterizer has detected the predetermined number of consecutive pages containing the include command. The present invention is not limited to being implemented in a printer and may also be implemented in a display device.